home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / tusrc.zip / MKINST~1 < prev    next >
Text File  |  1993-09-18  |  585b  |  33 lines

  1. #!/bin/sh
  2. # Make directory hierarchy. 
  3. # Written by Noah Friedman <friedman@prep.ai.mit.edu>
  4. # Public domain.
  5.  
  6. defaultIFS='     
  7. '
  8. IFS="${IFS-${defaultIFS}}"
  9.  
  10. for file in ${1+"$@"} ; do 
  11.    oIFS="${IFS}"; IFS='/'; set - ${file}; IFS="${oIFS}"
  12.    test ".${1}" = "." && shift
  13.  
  14.    case "${file}" in 
  15.     /* ) pathcomp='/' ;;
  16.     * )  pathcomp=''  ;;
  17.    esac
  18.  
  19.    while test $# -ne 0 ; do
  20.      pathcomp="${pathcomp}${1}"
  21.      shift
  22.  
  23.      if test ! -d "${pathcomp}"; then
  24.         echo "mkdir $pathcomp" 1>&2
  25.         mkdir "${pathcomp}"
  26.      fi
  27.  
  28.      pathcomp="${pathcomp}/"
  29.    done
  30. done
  31.  
  32. # eof
  33.